<template>
  <div class="enjoyItems">
    <van-list :finished="listfinished" finished-text="没有更多了">
      <van-cell v-for="(v,k) in items[itemid]" :key="k">
          <van-card
            :desc="v.name"
            :thumb="v.src"
            lazy-load
            :thumb-link="`/enjoy/desc?id=` + v.id"
          />
      </van-cell>
    </van-list>
  </div>
</template>
<script>

    var imgs = [
      [
        {
          id:1,
          name:'风景如画的图片',
          src:'https://img.yzcdn.cn/vant/apple-1.jpg'
        },
        {
          id:2,
          name:'风景如画的图片',
          src:'https://img.yzcdn.cn/vant/apple-1.jpg'
        },
        {
          id:3,
          name:'风景如画的图片',
          src:'https://img.yzcdn.cn/vant/apple-1.jpg'
        },
      ],
      [
        {
          id:4,
          name:'美女如云的图片',
          src:'https://img.yzcdn.cn/vant/apple-2.jpg'
        },
        {
          id:5,
          name:'美女如云的图片',
          src:'https://img.yzcdn.cn/vant/apple-2.jpg'
        },
        {
          id:7,
          name:'美女如云的图片',
          src:'https://img.yzcdn.cn/vant/apple-2.jpg'
        },
      ],
      [
        {
          id:8,
          name:'宠物交流',
          src:'https://img.yzcdn.cn/vant/apple-3.jpg'
        },
        {
          id:9,
          name:'宠物交流',
          src:'https://img.yzcdn.cn/vant/apple-3.jpg'
        },
        {
          id:10,
          name:'宠物交流',
          src:'https://img.yzcdn.cn/vant/apple-3.jpg'
        },
      ],
      [
        {
          id:11,
          name:'技术交流',
          src:'https://img.yzcdn.cn/vant/apple-4.jpg'
        },
        {
          id:12,
          name:'技术交流',
          src:'https://img.yzcdn.cn/vant/apple-4.jpg'
        },
        {
          id:13,
          name:'技术交流',
          src:'https://img.yzcdn.cn/vant/apple-4.jpg'
        },
      ],
      [
        {
          id:14,
          name:'名车鉴赏',
          src:'https://img.yzcdn.cn/vant/apple-5.jpg'
        },
        {
          id:15,
          name:'名车鉴赏',
          src:'https://img.yzcdn.cn/vant/apple-5.jpg'
        },
        {
          id:16,
          name:'名车鉴赏',
          src:'https://img.yzcdn.cn/vant/apple-5.jpg'
        },
      ]
    ];
    import {List,Cell,Card} from 'vant'
    export default {
        name: "Enjoyitems",
        props:['id'],
        data(){
          return {
            items:imgs,
            itemid:0,
            listfinished:true
          }
        },
        components:{
          [List.name]:List,
          [Cell.name]:Cell,
          [Card.name]:Card
        },
        created() {

        },
        watch: {
          id:function(newvalue,oldvalue){
            this.itemid = newvalue
          }
        }
    }
</script>

<style scoped>

</style>
